import request from './request.js'

//登录
export function getLoginHandle(data) {
    return request({
        url: '/member/login',
        method: 'post',
        data:{data}
    })
}
// 首页轮播图
export function getindexHandle (data) {
  return request({
    url: '/index/index',
    method: 'post',
    data
  })
}
// 商品详情
export function getGoodsDetailHandle (data) {
  return request({
    url: '/goods/detail',
    method: 'post',
    data
  })
}

// 添加收货地址
export function addAddressHandle (data) {
  return request({
    url: '/buy/add_addr',
    method: 'post',
    data
  })
}
// 选择支付方式
export function getbuyHandle (data) {
  return request({
    url: '/buy/change_order',
    method: 'post',
    data
  })
}

// 创建订单
export function getcreateOrderHandle (data) {
  return request({
    url: '/orders/create_order',
    method: 'post',
    data
  })
}

// 用户注册信息提交
export function getRegisterHandle (data) {
  return request({
    url: '/member/DoRegisterMsg',
    method: 'POST',
    data: { data }
  })
}
// 用户注册发送手机号码
export function getSendSmsHandle (data) {
  return request({
    url: '/member/registerMsg',
    method: 'POST',
    data: { data }
  })
}